<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>线条变化</title>
		<style>
			body{
				background-color: rgb(44,62,80);
			}
			.box{
				width: 200px;
				height: 400px;
				background-color: cadetblue;
				transition: all .8s;
				margin: 200px auto;
				position: relative;
			}
			.box:hover{
				background-color: rgb(44,62,80);
				color: wheat;	
			}
			span{
				display: block;
				position: absolute;
				top: 0;
				left: 0;
				width: 2px;
				height: 0px;
				background-color: red;
				transition: all .8s linear;
				opacity: 0;
			}
			
			span:nth-child(2){
				display: block;
				position: absolute;
				top: 0;
				left: auto;
				right: 0;
				width: 2px;
				height: 0px;
				background-color: red;
			}
			
			span:nth-child(3){
				display: block;
				position: absolute;
				width: 0px;
				height: 2px;
				background-color: red;
			}
			
			span:nth-child(4){
				display: block;
				position: absolute;
				top: auto;
				bottom: 0;
				width: 0px;
				height: 2px;
				background-color: red;
			}
			
			.box:hover .shu{
				height: 400px;
				opacity: 1;
			}
			.box:hover .heng{
				width: 200px;
				opacity: 1;
			}
			h1{
				
			}
		</style>
	</head>
	<body>
		<div class="box">
			<span class="shu"></span>
			<span class="shu"></span>
			<span class="heng"></span>
			<span class="heng"></span>
			<h1>1234</h1>
		</div>
		<div class="box">
			<h1>222222</h1>
		</div>
	</body>
</html>
